#include <stdio.h>
void Convert(int a[][4], int b[][3]);
main()
{	 	   	   	  
    int i, j;
    int a[3][4], b[4][3];//2
    for (i = 0; i < 3; i++)//1
    {	 	   	   	  
        for (j = 0; j < 4; j++)//1
        {	 	   	   	  
            scanf("%d", &a[i][j]);
        }
    }
    Convert(a, b);//1
    for (i = 0; i < 4; i++)//1
    {	 	   	   	  
        for (j = 0; j < 3; j++)//1
            printf(" %4d", b[i][j]);
        printf("\n");//1
    }
}	 	   	   	  
void Convert(int a[][4], int b[][3])
{	 	   	   	  
    int i, j;
    for (i = 0; i < 4; i++)//1
    {	 	   	   	  
        for (j = 0; j < 3; j++)//1
        {	 	   	   	  
            b[i][j] = a[j][i];//1
        }
    }
}	 	   	   	  
